package jvm;

import java.util.ArrayList;
import java.util.List;

public class OutOfMemory {

    public static void main(String[] args) {
        List<Demo> list = new ArrayList<>();
        while(true){
            list.add(new Demo());
            System.out.println(list.size());
        }
    }
}
